home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / 1DRPFLE (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  2.2 KB  |  53 lines

  1. package com.sun.java.swing.plaf.basic;
  2.  
  3. import java.awt.Component;
  4. import java.awt.Container;
  5. import java.awt.Dimension;
  6. import java.awt.LayoutManager;
  7. import java.io.Serializable;
  8.  
  9. class BasicSplitPaneDivider$DividerLayout implements LayoutManager, Serializable {
  10.    // $FF: synthetic field
  11.    BasicSplitPaneDivider this$0;
  12.  
  13.    public void layoutContainer(Container c) {
  14.       if (this.this$0.leftButton != null && this.this$0.rightButton != null && c == this.this$0) {
  15.          if (this.this$0.splitPane.isOneTouchExpandable()) {
  16.             int blockSize = Math.min(this.this$0.getDividerSize(), 5);
  17.             if (this.this$0.orientation == 0) {
  18.                int y = (((Component)c).getSize().height - blockSize) / 2;
  19.                this.this$0.leftButton.setBounds(2, y, blockSize * 2, blockSize);
  20.                this.this$0.rightButton.setBounds(14, y, blockSize * 2, blockSize);
  21.             } else {
  22.                int x = (((Component)c).getSize().width - blockSize) / 2;
  23.                this.this$0.leftButton.setBounds(x, 2, blockSize, blockSize * 2);
  24.                this.this$0.rightButton.setBounds(x, 14, blockSize, blockSize * 2);
  25.             }
  26.          } else {
  27.             this.this$0.leftButton.setBounds(-5, -5, 1, 1);
  28.             this.this$0.rightButton.setBounds(-5, -5, 1, 1);
  29.          }
  30.       }
  31.  
  32.    }
  33.  
  34.    public Dimension minimumLayoutSize(Container c) {
  35.       return new Dimension(0, 0);
  36.    }
  37.  
  38.    public Dimension preferredLayoutSize(Container c) {
  39.       return new Dimension(0, 0);
  40.    }
  41.  
  42.    public void removeLayoutComponent(Component c) {
  43.    }
  44.  
  45.    public void addLayoutComponent(String string, Component c) {
  46.    }
  47.  
  48.    // $FF: synthetic method
  49.    BasicSplitPaneDivider$DividerLayout(BasicSplitPaneDivider this$0) {
  50.       this.this$0 = this$0;
  51.    }
  52. }
  53.